﻿using System;
using System.Collections;
using System.Collections.Generic;
using DG.Tweening;
using Unity.Mathematics;
using UnityEditor;
using UnityEngine;

public class BattleSceneMainUnitRegion : MonoBehaviour
{
    public float left;
    public float right;
    public float top;
    public float bottom;

    public float angle;
    
    private void OnDrawGizmosSelected()
    {
        var center = /*new Vector3((left + right) / 2, 0, (top + bottom) / 2) + */transform.position;
        var q = Quaternion.AngleAxis(angle, Vector3.up);
        Gizmos.DrawLine(q * new Vector3(left,1,top) + center,q * new Vector3(left,1,bottom) + center);
        Gizmos.DrawLine(q * new Vector3(left,1,bottom) + center, q * new Vector3(right,1,bottom) + center);
        Gizmos.DrawLine(q * new Vector3(right,1,bottom) + center, q * new Vector3(right,1,top) + center);
        Gizmos.DrawLine(q * new Vector3(right,1,top) + center, q * new Vector3(left,1,top) + center);
    }
}
